<?php
  header("Content-type:text/html;charset=utf-8");
  require_once('inc_admin.php');
 
  //连接数据库		
  connect();

  /*if(!empty($_FILES["pic"]["typename"])){
  	$pic = uploadfile('pic',UserPhotoPath,array('jpg','gif','png'));
  }
  else{
  	$pic='';
  }*/

  $data = array(
		'typename'=>trim($_POST['typename'])
  	);

  //执行SQL语句
	$result = add('videotype',$data);

  if(!$result){
  	echo "添加失败！<br/>";
  	echo "<a href='vtForm.html'>返回</a>";	  
  }else{	  
 	redirect('vtList.php','添加成功');
 		  
  }    
  
?>